#!/usr/bin/perl -w

BEGIN {
	push @::INC,"../lib";
}

use strict;
use C_client2;

$::channel=new C_client2(CLIENT_KEY=>"testkey",SERVER_INET=>"127.0.0.1",SERVER_PORT=>44553,SERVER_NAME=>"node1");
if(!defined($::channel)) {
	print STDERR "Unable to create client2 connection!\n";
	exit 1;
}

$::channel->set_params(WINDOW => 255);
($::resp,$::err)=$::channel->send_request("hello!");
if(defined($::err)) {
	print "Error: $::err\n";
	exit 1;
}
print "Response from server: $::resp\n";

($::resp,$::err)=$::channel->send_request("Hehh qw eq qe q qe!");
if(defined($::err)) {
	print "Error: $::err\n";
	exit 1;
}
print "Response from server: $::resp\n";

$::channel=undef;
exit 0;

